# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-http-cache-transparent
pkgver=1.4
pkgrel=4
pkgdesc="Cache the result of http-gets persistently"
arch=('any')
url="https://search.cpan.org/dist/HTTP-Cache-Transparent"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0' 'perl-libwww')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/M/MA/MATTIASH/HTTP-Cache-Transparent-$pkgver.tar.gz)
sha256sums=('6622e1b5e5af952b1711aea247bdcb1b91c2aac0f11f32f819a2d07e11dd2845')

build() {
  cd  "$srcdir"/HTTP-Cache-Transparent-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/HTTP-Cache-Transparent-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
